package com.hornsun.domain.dbo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class MemberCouponExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public MemberCouponExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMemberCouponGuidIsNull() {
            addCriterion("member_coupon_guid is null");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidIsNotNull() {
            addCriterion("member_coupon_guid is not null");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidEqualTo(String value) {
            addCriterion("member_coupon_guid =", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidNotEqualTo(String value) {
            addCriterion("member_coupon_guid <>", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidGreaterThan(String value) {
            addCriterion("member_coupon_guid >", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidGreaterThanOrEqualTo(String value) {
            addCriterion("member_coupon_guid >=", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidLessThan(String value) {
            addCriterion("member_coupon_guid <", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidLessThanOrEqualTo(String value) {
            addCriterion("member_coupon_guid <=", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidLike(String value) {
            addCriterion("member_coupon_guid like", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidNotLike(String value) {
            addCriterion("member_coupon_guid not like", value, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidIn(List<String> values) {
            addCriterion("member_coupon_guid in", values, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidNotIn(List<String> values) {
            addCriterion("member_coupon_guid not in", values, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidBetween(String value1, String value2) {
            addCriterion("member_coupon_guid between", value1, value2, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andMemberCouponGuidNotBetween(String value1, String value2) {
            addCriterion("member_coupon_guid not between", value1, value2, "memberCouponGuid");
            return (Criteria) this;
        }

        public Criteria andOpenidIsNull() {
            addCriterion("openid is null");
            return (Criteria) this;
        }

        public Criteria andOpenidIsNotNull() {
            addCriterion("openid is not null");
            return (Criteria) this;
        }

        public Criteria andOpenidEqualTo(String value) {
            addCriterion("openid =", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidNotEqualTo(String value) {
            addCriterion("openid <>", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidGreaterThan(String value) {
            addCriterion("openid >", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidGreaterThanOrEqualTo(String value) {
            addCriterion("openid >=", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidLessThan(String value) {
            addCriterion("openid <", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidLessThanOrEqualTo(String value) {
            addCriterion("openid <=", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidLike(String value) {
            addCriterion("openid like", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidNotLike(String value) {
            addCriterion("openid not like", value, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidIn(List<String> values) {
            addCriterion("openid in", values, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidNotIn(List<String> values) {
            addCriterion("openid not in", values, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidBetween(String value1, String value2) {
            addCriterion("openid between", value1, value2, "openid");
            return (Criteria) this;
        }

        public Criteria andOpenidNotBetween(String value1, String value2) {
            addCriterion("openid not between", value1, value2, "openid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidIsNull() {
            addCriterion("coupon_guid is null");
            return (Criteria) this;
        }

        public Criteria andCouponGuidIsNotNull() {
            addCriterion("coupon_guid is not null");
            return (Criteria) this;
        }

        public Criteria andCouponGuidEqualTo(String value) {
            addCriterion("coupon_guid =", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidNotEqualTo(String value) {
            addCriterion("coupon_guid <>", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidGreaterThan(String value) {
            addCriterion("coupon_guid >", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidGreaterThanOrEqualTo(String value) {
            addCriterion("coupon_guid >=", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidLessThan(String value) {
            addCriterion("coupon_guid <", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidLessThanOrEqualTo(String value) {
            addCriterion("coupon_guid <=", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidLike(String value) {
            addCriterion("coupon_guid like", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidNotLike(String value) {
            addCriterion("coupon_guid not like", value, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidIn(List<String> values) {
            addCriterion("coupon_guid in", values, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidNotIn(List<String> values) {
            addCriterion("coupon_guid not in", values, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidBetween(String value1, String value2) {
            addCriterion("coupon_guid between", value1, value2, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andCouponGuidNotBetween(String value1, String value2) {
            addCriterion("coupon_guid not between", value1, value2, "couponGuid");
            return (Criteria) this;
        }

        public Criteria andGainTimeIsNull() {
            addCriterion("gain_time is null");
            return (Criteria) this;
        }

        public Criteria andGainTimeIsNotNull() {
            addCriterion("gain_time is not null");
            return (Criteria) this;
        }

        public Criteria andGainTimeEqualTo(Date value) {
            addCriterion("gain_time =", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeNotEqualTo(Date value) {
            addCriterion("gain_time <>", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeGreaterThan(Date value) {
            addCriterion("gain_time >", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("gain_time >=", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeLessThan(Date value) {
            addCriterion("gain_time <", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeLessThanOrEqualTo(Date value) {
            addCriterion("gain_time <=", value, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeIn(List<Date> values) {
            addCriterion("gain_time in", values, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeNotIn(List<Date> values) {
            addCriterion("gain_time not in", values, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeBetween(Date value1, Date value2) {
            addCriterion("gain_time between", value1, value2, "gainTime");
            return (Criteria) this;
        }

        public Criteria andGainTimeNotBetween(Date value1, Date value2) {
            addCriterion("gain_time not between", value1, value2, "gainTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeIsNull() {
            addCriterion("expiration_time is null");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeIsNotNull() {
            addCriterion("expiration_time is not null");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeEqualTo(Date value) {
            addCriterion("expiration_time =", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeNotEqualTo(Date value) {
            addCriterion("expiration_time <>", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeGreaterThan(Date value) {
            addCriterion("expiration_time >", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("expiration_time >=", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeLessThan(Date value) {
            addCriterion("expiration_time <", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeLessThanOrEqualTo(Date value) {
            addCriterion("expiration_time <=", value, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeIn(List<Date> values) {
            addCriterion("expiration_time in", values, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeNotIn(List<Date> values) {
            addCriterion("expiration_time not in", values, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeBetween(Date value1, Date value2) {
            addCriterion("expiration_time between", value1, value2, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andExpirationTimeNotBetween(Date value1, Date value2) {
            addCriterion("expiration_time not between", value1, value2, "expirationTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeIsNull() {
            addCriterion("pay_time is null");
            return (Criteria) this;
        }

        public Criteria andPayTimeIsNotNull() {
            addCriterion("pay_time is not null");
            return (Criteria) this;
        }

        public Criteria andPayTimeEqualTo(Date value) {
            addCriterion("pay_time =", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeNotEqualTo(Date value) {
            addCriterion("pay_time <>", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeGreaterThan(Date value) {
            addCriterion("pay_time >", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("pay_time >=", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeLessThan(Date value) {
            addCriterion("pay_time <", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeLessThanOrEqualTo(Date value) {
            addCriterion("pay_time <=", value, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeIn(List<Date> values) {
            addCriterion("pay_time in", values, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeNotIn(List<Date> values) {
            addCriterion("pay_time not in", values, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeBetween(Date value1, Date value2) {
            addCriterion("pay_time between", value1, value2, "payTime");
            return (Criteria) this;
        }

        public Criteria andPayTimeNotBetween(Date value1, Date value2) {
            addCriterion("pay_time not between", value1, value2, "payTime");
            return (Criteria) this;
        }

        public Criteria andOrderNumIsNull() {
            addCriterion("order_num is null");
            return (Criteria) this;
        }

        public Criteria andOrderNumIsNotNull() {
            addCriterion("order_num is not null");
            return (Criteria) this;
        }

        public Criteria andOrderNumEqualTo(String value) {
            addCriterion("order_num =", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumNotEqualTo(String value) {
            addCriterion("order_num <>", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumGreaterThan(String value) {
            addCriterion("order_num >", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumGreaterThanOrEqualTo(String value) {
            addCriterion("order_num >=", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumLessThan(String value) {
            addCriterion("order_num <", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumLessThanOrEqualTo(String value) {
            addCriterion("order_num <=", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumLike(String value) {
            addCriterion("order_num like", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumNotLike(String value) {
            addCriterion("order_num not like", value, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumIn(List<String> values) {
            addCriterion("order_num in", values, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumNotIn(List<String> values) {
            addCriterion("order_num not in", values, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumBetween(String value1, String value2) {
            addCriterion("order_num between", value1, value2, "orderNum");
            return (Criteria) this;
        }

        public Criteria andOrderNumNotBetween(String value1, String value2) {
            addCriterion("order_num not between", value1, value2, "orderNum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}